package com.megvii.livenesslib.view;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.AttributeSet;
import android.view.TextureView;

/**
 * @Author wangziheng
 * @ProjectName ywydt
 * @ClassName LivenTextureView
 * @package com.feihong.yw189.view
 * @data 2019/1/7 11:29
 * @Describe
 * @Change
 */
public class LivenTextureView extends TextureView {
    public LivenTextureView(Context context) {
        super(context);
    }

    public LivenTextureView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public LivenTextureView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public void setBackgroundDrawable(Drawable background) {
        if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N && background != null) {
            super.setBackgroundDrawable(background);
        }
    }
}
